<template>
  <div class="special">
    <search></search>
    <van-pull-refresh v-model="isLoading" @refresh="onRefresh">
      <index :topicList="topicList"></index>
    </van-pull-refresh>
    
  </div>
</template>
<script>
import Search from '@/components/special/Search'
import Index from '@/components/special/Index'
// 导入网络封装模块
import { request } from "@/axios/request";
export default {
  name: "Secial",
  data() {
    return {
      topicList:[],
      isLoading:false
    };
  },
  methods: {
    onRefresh() {
      setTimeout(() => {
        this.isLoading = false;
        this.count++;
      }, 1000);
    }
  },
  components: {
    Search,Index
  },
  mounted() {
    request({
      url: "topic/list",
      
    })
      .then(res => {
        this.topicList = res.data.data;
        // console.log(this.topicList);
      })
      .catch(err => {
        console.log(err);
      });
  }
};
</script>
<style lang="less" scoped>
.special{
  margin-bottom: 50px;
}
</style>
